from django.db.models.signals import post_save
from django.dispatch import receiver
from .callback import VisitRecord


@receiver(post_save, sender='sales_man.Single')
def callback(**kwargs):
    single_obj = kwargs.get("instance")
    visit_record_api = VisitRecord(single_obj)
    visit_record_api.start_thread()
